To obtain information about a sound channel, you can pass a pointer to a sound channel status record to the SndChannelStatus function. The SCStatus data type defines a sound channel status record.
TYPE SCStatus =
RECORD
scStartTime: Fixed; {starting time for play from disk}
scEndTime: Fixed; {ending time for play from disk}
scCurrentTime: Fixed; {current time for play from disk}
scChannelBusy: Boolean; {TRUE if channel is processing cmds}
scChannelDisposed: Boolean; {reserved}
scChannelPaused: Boolean; {TRUE if channel is paused}
scUnused: Boolean; {unused}
scChannelAttributes: LongInt; {attributes of this channel}
scCPULoad: LongInt; {CPU load for this channel}
END;
You can mask out certain values in the scChannelAttributes field to determine how a channel has been initialized.
CONST
initPanMask = $0003; {mask for right/left pan values}
initSRateMask = $0030; {mask for sample rate values}
initStereoMask = $00C0; {mask for mono/stereo values}
initCompMask = $FF00; {mask for compression IDs}
| Previous | Chapter contents | Chapter top | Section top | Next |